package com.ecoolex.chinadutyfree.retailer.core.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.ecoolex.framework.message.queue.Message;
import com.ecoolex.framework.message.queue.ProducerManager;

@Component
public class ProducerService {

	@Autowired
    private ProducerManager producerManager;

    private Logger log = LoggerFactory.getLogger(ProducerService.class);

    /**
     * 创建订单推送到银联的消息
     * @param orderId
     */
    public void sendPushOrderToUnionPayMessage(Integer orderId){
        log.info("开始创建订单推送消息={}",orderId);
        producerManager.sendAsync(new Message("chinadutyfree.retailer.order.record.create", orderId.toString()));
    }
}
